package world.criver.h50909.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import world.criver.h50909.dao.daoUpdate;
import world.criver.h50909.entity.entConfig;
import world.criver.h50909.request.reqCompany;
import world.criver.h50909.request.reqEquipment;
import world.criver.h50909.response.resStatus;
import world.criver.h50909.service.serUpdate;

@RestController
@RequestMapping("/update")
public class conUpdate implements daoUpdate {
    @Autowired
    private serUpdate serUpdate;
    @Override
    @PostMapping("/company")
    public resStatus updateCompany(@RequestBody reqCompany info) {
        return serUpdate.updateCompany(info);
    }
    @Override
    @PostMapping("/equipment")
    public resStatus updateEquipment(@RequestBody reqEquipment info) {
        return serUpdate.updateEquipment(info);
    }

    @Override
    @PostMapping("/model")
    public resStatus updateModel(@RequestBody reqEquipment info) {
        return serUpdate.updateModel(info);
    }
}
